using System.Net.Http;
using AutoMapper;
using Common.Commands.TrackLogCommands;
using Dto.ApiRequests.MemberForms;
using WebApp.Services;

namespace WebApp.ControllerApis
{
    public class MemberAttdnanceController : SmartApiController
    {
        public MemberAttdnanceController(IUserSession userSession, IMappingEngine mappingEngine) : base(userSession, mappingEngine)
        {
        }

        public HttpResponseMessage Post(TrackLogForm form)
        {
            var command = MappingEngine.Map<TrackLogForm, AddTrackLog>(form);          
            return ExecuteCommand(command);
        }
    }
}